package br.com.fafica.fast_restaurant.view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JButton;
import javax.swing.LayoutStyle.ComponentPlacement;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Color;

public class TelaMesas extends JFrame {

	private JPanel contentPane;

			public void run() {
				try {
					TelaMesas frame = new TelaMesas();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}

	public TelaMesas() {
		final TelaMesas estaTela = this;
		
		setTitle("MESAS");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 759, 551);
		contentPane = new JPanel();
		contentPane.setBackground(new Color(255, 255, 255));
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		
		JButton btnNewButton = new JButton("Mesa 1");
		btnNewButton.setForeground(new Color(255, 215, 0));
		btnNewButton.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa = new JButton("Mesa 2");
		btnMesa.setForeground(new Color(255, 215, 0));
		btnMesa.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_1 = new JButton("Mesa 3");
		btnMesa_1.setForeground(new Color(255, 215, 0));
		btnMesa_1.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_4 = new JButton("Mesa 6");
		btnMesa_4.setForeground(new Color(255, 215, 0));
		btnMesa_4.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_5 = new JButton("Mesa 7");
		btnMesa_5.setForeground(new Color(255, 215, 0));
		btnMesa_5.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_6 = new JButton("Mesa 8");
		btnMesa_6.setForeground(new Color(255, 215, 0));
		btnMesa_6.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_7 = new JButton("Mesa 9");
		btnMesa_7.setForeground(new Color(255, 215, 0));
		btnMesa_7.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_2 = new JButton("Mesa 4");
		btnMesa_2.setForeground(new Color(255, 215, 0));
		btnMesa_2.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_3 = new JButton("Mesa 5");
		btnMesa_3.setForeground(new Color(255, 215, 0));
		btnMesa_3.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_8 = new JButton("Mesa 10");
		btnMesa_8.setForeground(new Color(255, 215, 0));
		btnMesa_8.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_9 = new JButton("Mesa 11");
		btnMesa_9.setForeground(new Color(255, 215, 0));
		btnMesa_9.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_18 = new JButton("Mesa 20");
		btnMesa_18.setForeground(new Color(255, 215, 0));
		btnMesa_18.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_10 = new JButton("Mesa 12");
		btnMesa_10.setForeground(new Color(255, 215, 0));
		btnMesa_10.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_11 = new JButton("Mesa 13");
		btnMesa_11.setForeground(new Color(255, 215, 0));
		btnMesa_11.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_12 = new JButton("Mesa 14");
		btnMesa_12.setForeground(new Color(255, 215, 0));
		btnMesa_12.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_13 = new JButton("Mesa 15");
		btnMesa_13.setForeground(new Color(255, 215, 0));
		btnMesa_13.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_17 = new JButton("Mesa 19");
		btnMesa_17.setForeground(new Color(255, 215, 0));
		btnMesa_17.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_16 = new JButton("Mesa 18");
		btnMesa_16.setForeground(new Color(255, 215, 0));
		btnMesa_16.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_15 = new JButton("Mesa 17");
		btnMesa_15.setForeground(new Color(255, 215, 0));
		btnMesa_15.setBackground(new Color(0, 100, 0));
		
		JButton btnMesa_14 = new JButton("Mesa 16");
		btnMesa_14.setForeground(new Color(255, 215, 0));
		btnMesa_14.setBackground(new Color(0, 100, 0));
		
		JButton btnVoltar = new JButton("VOLTAR");
		btnVoltar.setForeground(new Color(0, 0, 0));
		btnVoltar.setBackground(new Color(192, 192, 192));
		btnVoltar.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				
				estaTela.dispose();
				TelaPrincipal telaPrincipal = new TelaPrincipal();
				telaPrincipal.setVisible(true);
				
			}
		});
		GroupLayout gl_contentPane = new GroupLayout(contentPane);
		gl_contentPane.setHorizontalGroup(
			gl_contentPane.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_contentPane.createSequentialGroup()
					.addGap(47)
					.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
						.addGroup(gl_contentPane.createSequentialGroup()
							.addComponent(btnMesa_4, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(22)
							.addComponent(btnMesa_5, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_6, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_7, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_8, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE))
						.addGroup(gl_contentPane.createSequentialGroup()
							.addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(22)
							.addComponent(btnMesa, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_1, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_2, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_3, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE))
						.addGroup(gl_contentPane.createSequentialGroup()
							.addComponent(btnMesa_9, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(22)
							.addComponent(btnMesa_10, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_11, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_12, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_13, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE))
						.addGroup(gl_contentPane.createSequentialGroup()
							.addComponent(btnMesa_14, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(22)
							.addComponent(btnMesa_15, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_16, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_17, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)
							.addGap(18)
							.addComponent(btnMesa_18, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE)))
					.addContainerGap(81, Short.MAX_VALUE))
				.addGroup(Alignment.TRAILING, gl_contentPane.createSequentialGroup()
					.addContainerGap(332, Short.MAX_VALUE)
					.addComponent(btnVoltar, GroupLayout.PREFERRED_SIZE, 82, GroupLayout.PREFERRED_SIZE)
					.addGap(319))
		);
		gl_contentPane.setVerticalGroup(
			gl_contentPane.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_contentPane.createSequentialGroup()
					.addGap(38)
					.addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING)
						.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
							.addComponent(btnMesa_1, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
							.addComponent(btnMesa_2, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
							.addComponent(btnMesa_3, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE))
						.addComponent(btnNewButton, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnMesa, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE))
					.addGap(18)
					.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
						.addComponent(btnMesa_5, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnMesa_4, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)
							.addComponent(btnMesa_6, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
							.addComponent(btnMesa_7, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
							.addComponent(btnMesa_8, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)))
					.addGap(18)
					.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
						.addComponent(btnMesa_9, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnMesa_10, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnMesa_11, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnMesa_12, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnMesa_13, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE))
					.addGap(18)
					.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
						.addComponent(btnMesa_14, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnMesa_15, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnMesa_16, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnMesa_17, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)
						.addComponent(btnMesa_18, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE))
					.addGap(61)
					.addComponent(btnVoltar, GroupLayout.PREFERRED_SIZE, 38, GroupLayout.PREFERRED_SIZE)
					.addContainerGap(72, Short.MAX_VALUE))
		);
		contentPane.setLayout(gl_contentPane);
	}

}
